1. Field of the Disclosure
This disclosure generally relates to an input device and, more particularly, to a displacement detection device capable of increasing the applicable work surface.
2. Description of the Related Art
In peripheral devices of a computer system, the mouse device has become an important input device. As the conventional wheel mouse has the problem of dust accumulation, the wheel mouse is gradually replaced by the optical mouse.
The optical mouse generally calculates the displacement according to the image correlation between successive images. For example referring to FIG. 1, it shows two images F1 and F2 captured by an optical mouse. In each sampling period, an image capturing unit captures a current image F2 which is then sent to a processing unit. The image capturing unit has captured a reference image F1 in a previous sampling period. The processing unit selects a reference block RB of a predetermined size in the reference image F1 served as a target to be compared, and uses a search block SB of an identical size in the current image F2 to sequentially search the whole of the current image F2 so as to find an optimum search block that has the highest correlation with the reference block RB. Then, the processing unit calculates a position variation between a corresponding position of the reference block RB in the current image F2 and the optimum search block to be served as the outputted displacement of the optical mouse.
However, as the conventional optical mouse utilizes the reference block and the search block of a fixed size to calculate displacement, the displacement may not be calculated correctly in some conditions. For example, when the optical mouse is operated on a glass surface, the displacement may not be able to be calculated correctly.
Accordingly, the present disclosure further provides a displacement detection device that may adjust the block size of comparison blocks according to the content of detected images so as to be adapted to broad work surfaces.